<template>
    <div id="app">
        <div id="webgl"></div>
    </div>
</template>

<script>

    import IndexController from './controller/index-controller'

    export default {
        name: 'app',
        data () {
            return {
                msg: 'Welcome to Your Vue.js App',
                controller: null,
                gl: null
            }
        },
        mounted(){
            this.controller = new IndexController({
                container: 'webgl'
            }).prepareGL();
        },
        methods: {
            repaint: function (event) {
                this.controller.repaint();
            },
            rotateX: function () {
                this.controller.rotateX();
            },
            rotateY: function () {
                this.controller.rotateY();
            },
            rotateZ: function () {
                this.controller.rotateZ();
            }
        }
    }
</script>

<style>

    #webgl {
        width: 500px;
        height: 500px;
        margin: 0;
        padding: 0;
    }


</style>
